Skip to main content

REPLACE

Replaces characters within a text string with different characters.

Syntax

REPLACE(old_text, start_num, num_chars, new_text)

Arguments

  • old_text: The text in which you want to replace characters.
  • start_num: The position of the first character to replace (starting from 1).
  • num_chars: The number of characters to replace.
  • new_text: The text that will replace the characters in the original text.

Example

REPLACE("AnyDB", 4, 2, "where") → Returns "Anywhere"
REPLACE(A1, 1, 3, "New") → Replaces the first 3 characters in cell A1 with "New"